using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
using System.Data;

using PlugNT.Safe;
using PlugNT.Cms.Custom;
using PlugNT.Database;
using PlugNT.Database.Common.Simple;
using PlugNT.App.UCenter.Model;

namespace PlugNT.App.UCenter.BLL
{
    public class UIntegral
    {
        private static readonly PlugNT.App.UCenter.DAL.UIntegral dal = new PlugNT.App.UCenter.DAL.UIntegral();



        public UIntegralInfo GetUIntegralInfo(int id)
        {
            return dal.GetUIntegralInfo(id);
        }

        public bool Add(UIntegralInfo info)
        {
            return dal.Add(info);
        }


        public bool Delete(string andWhere)
        {
            return dal.Delete(andWhere);
        }










        public DataTable GetList(int pageSize, int currPage, int userId, out int recordCount)
        {
            StringBuilder andwhere = new StringBuilder();
            if (userId > 0)
            {
                andwhere.Append(" and [user_id]=" + userId.ToString());
            }
            recordCount = dal.GetCount(andwhere.ToString());
            return dal.GetList(pageSize, currPage, andwhere.ToString());
        }

     

    }
}

